package com.bitinstitute.parkapp.animals;

import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import com.bitinstitute.parkapp.R;
import com.bitinstitute.parkapp.animals.types.TypesMenuActivity;
import com.bitinstitute.parkapp.helper.TabGroupActivity;

public class AnimalActivityList extends Activity {

	private ListView animalList;
	
	// List of clickable items
	private String lv_arr[] = { "Arten", "Einrichtungen(dummy)",
			"Die Schaufütterungen(dummy)", "Tierpatenschaften(dummy)" };

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
		setContentView(R.layout.animalactivitylist_layout);

		
		animalList = (ListView) findViewById(R.id.listViewAnimals);

		animalList.setAdapter(new ArrayAdapter<String>(this, R.layout.custom_list_item, android.R.id.text1, lv_arr));

		animalList.setOnItemClickListener(new OnItemClickListener() {
			public void onItemClick(AdapterView<?> parent, View view,
					int position, long id) {

				switch (position) {
				case 0:
					Intent Types_Menu = new Intent(getParent(),TypesMenuActivity.class);
					TabGroupActivity parentActivity = (TabGroupActivity) getParent();
					parentActivity.startChildActivity("TypesMenu", Types_Menu);
					break;

				case 1:


					break;
				case 2:

					break;
				case 3:

					break;

				default:
					// Do Nothing!
				}

			}
		});

	}
}